package factory;

import factory.pizza.Pizza;

public class Order {

    SimplePizzaFactory factory;

    public Order(SimplePizzaFactory factory) {
        this.factory = factory;
    }

    Pizza orderPizza(String type){
        Pizza pizza ;
        pizza = factory.createPizza(type);
        pizza.prepare();
        pizza.bake();
        pizza.cut();
        pizza.box();
        return pizza;
    }
}
